#pragma once
#include <string>
#include <fstream>
#include <iostream>

using namespace std;

class csvtools2
{
public:
	csvtools2(std::string csvname, std::string header, bool autofile = true,bool newfile = true);
	~csvtools2();

	void addrow(std::string row);
	void set_max_nums(int max);
private:
	void create_file();
private:
	int _maxnums = 100000;
	int _addindex_nums = 0;
	int _have_file_nums = 0;
	std::string _csvname;
	std::string _header_str;
	fstream _srcFile;
	bool _autofile = false;
	bool _newfile = true;
};

